<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>按钮</title>
    <script src="https://cdn.bootcss.com/jquery/3.4.0/jquery.min.js"></script>
    <script src="https://cdn.bootcss.com/layer/2.3/layer.js"></script>
    <style>.layui-layer-btn{text-align: center}</style>
</head>

<body>

<button class="logout">错误事件按钮</button>


<div style="display: none">
    <div id="ww">
        <p>sadkjsalkjdlksajlkdjkas</p>
        <p>sadkjsalkjdlksajlkdjkas</p>
        <p>sadkjsalkjdlksajlkdjkas</p>
        <p>sadkjsalkjdlksajlkdjkas</p>
        <p>sadkjsalkjdlksajlkdjkas</p>
    </div>
</div>
<script>
    var content = $('#ww').clone().html();
    $(".logout").click(function () {
        layer.open({
            type: 1,
            title: '提示',
            area: ['600px', '360px'],
            btn: ['我知道了'],
            yes: function(index, layero){
                //按钮【按钮一】的回调
                layer.closeAll();
            },
            btnAlign: 'c',
            shadeClose: true, //点击遮罩关闭
            content: content
        });
    });
</script>


</body>
</html>
